package objetsBd;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author verpoorten
 */
@Entity
@Table(name = "SuiviLoyer")
public class SuiviLoyerBd implements Serializable {

    private static final long serialVersionUID = 1L;
    private static final String SEQ_ID = "implements Serializable";
    @Id
    @SequenceGenerator(name = SEQ_ID,
            sequenceName = SEQ_ID, allocationSize = 1)
    @GeneratedValue(generator = SEQ_ID)
    @Column(name = "idSuivi")
    private Long idSuivi;
    @Column(name = "idLocation")
    private Long idLocation;
    @Column(name = "dateLoyerAttendu")
    @Temporal(TemporalType.DATE)
    private Date dateLoyerAttendu;
    @Column(name = "dateLoyerRecu")
    @Temporal(TemporalType.DATE)
    private Date dateLoyerRecu;
    @Column(name = "etatLoyer")
    private Integer etatLoyer;
    @Column(name = "remarque")
    private String remarque;
    @Column(name = "dateDeModif")
    @Temporal(TemporalType.DATE)
    private Date dateDeModif;

    public SuiviLoyerBd(Long idSuivi) {
        this.idSuivi = idSuivi;
    }

    public SuiviLoyerBd() {
    }

    public static SuiviLoyerBd parIdSuivi(Long idSuivi) {
        SuiviLoyerBd suiviLoyerBd = new SuiviLoyerBd();
        suiviLoyerBd.setIdSuivi(idSuivi);
        return suiviLoyerBd;
    }

    public Long getIdSuivi() {
        return idSuivi;
    }

    public void setIdSuivi(Long idSuivi) {
        this.idSuivi = idSuivi;
    }

    public Long getIdLocation() {
        return idLocation;
    }

    public void setIdLocation(Long idLocation) {
        this.idLocation = idLocation;
    }

    public Date getDateLoyerAttendu() {
        return dateLoyerAttendu;
    }

    public void setDateLoyerAttendu(Date dateLoyerAttendu) {
        this.dateLoyerAttendu = dateLoyerAttendu;
    }

    public Date getDateLoyerRecu() {
        return dateLoyerRecu;
    }

    public void setDateLoyerRecu(Date dateLoyerRecu) {
        this.dateLoyerRecu = dateLoyerRecu;
    }

    public Integer getEtatLoyer() {
        return etatLoyer;
    }

    public void setEtatLoyer(Integer etatLoyer) {
        this.etatLoyer = etatLoyer;
    }

    public String getRemarque() {
        return remarque;
    }

    public void setRemarque(String remarque) {
        this.remarque = remarque;
    }

    public Date getDateDeModif() {
        return dateDeModif;
    }

    public void setDateDeModif(Date dateDeModif) {
        this.dateDeModif = dateDeModif;
    }

    public static SuiviLoyerBd parIdLocation(Long idLocation) {
        SuiviLoyerBd batiment = new SuiviLoyerBd();
        batiment.idLocation = idLocation;
        return batiment;
    }
}
